package com.nbgroup.mapper;


import com.github.pagehelper.Page;
import com.nbgroup.pojo.Dept;
import com.nbgroup.pojo.User;
import com.nbgroup.pojo.common.User_transfer;
import com.nbgroup.pojo.dto.PageTransferDto;
import com.nbgroup.pojo.vo.CompanySonVo;
import com.nbgroup.pojo.vo.CompanyVo;
import com.nbgroup.pojo.vo.DepartmentSonVo;
import com.nbgroup.pojo.vo.DepartmentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface TransferMapper {

    Page<User_transfer> list(PageTransferDto dto);

    @Select("select * from company")
    ArrayList<CompanyVo> select();

    ArrayList<CompanySonVo> selectCompanySon(List<Integer> companySonIdList);

    ArrayList<DepartmentVo> selectDepartment(List<Integer> departmentIdList);

    ArrayList<DepartmentSonVo> selectDepartmentSon(List<Integer> departmentSonIdList);


    @Select("select * from user where dept_id = #{deptId}")
    List<User> userList(Integer deptId);

    List<Dept> deptList(List<Integer> deptIdList);

    List<User_transfer> usersList(List<Integer> usersIdList);

    @Select("select * from user where dept_id=#{deptId}")
    List<User> queryCom(Integer deptId);
}
